<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.hilaver.dzmis.Constants"%>
<%@ page import="com.hilaver.dzmis.accesscontrol.AcUser"%>
<%
	AcUser acUser = (AcUser)request.getSession().getAttribute(Constants.SESSION_USER);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0"><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> 
<title>Welcome to Design Zone......</title>
<script type="text/javascript" src="../scripts/processBar.js"></script>

<script type="text/javascript">var processBarInstance = new processBar('../');processBarInstance.updateMsg('Loading styles......');</script>
<script type="text/javascript">
	var acUserId = <%=acUser.getId()%>;
</script>
<link rel="stylesheet" type="text/css"
	href="../scripts/ext/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="../styles/dzbase.css" />	

<script type="text/javascript">processBarInstance.updateMsg('Loading API......');</script>
<script type="text/javascript" src="../scripts/ext/adapter/ext-base.js"></script>
<script type="text/javascript" src="../scripts/ext/ext-all.js"></script>
<script type="text/javascript" src="../scripts/grid/GroupSummary.js">
</script>

<script type="text/javascript" src="../scripts/i18nMessage.js"></script>
<script type="text/javascript" src="../scripts/layout.js"></script>
<script type="text/javascript" src="../scripts/tabAction.js"></script>

</head>
<body>
  <div id="west">
    
  </div>
  <div id="north" class="layoutHeader">
    <div style="float: left;"><h1>Design Zone</h1></div>
    <div id="userDiv">
    	<h2>
    		<img src="../images/icons/<%=acUser.getCtGender().equals("1")?"user_green.png":"user_female.png" %>"/>&nbsp;&nbsp;
    		<script type="text/javascript">
    			document.write(layoutMessage.get('ui.layout.welcome'));
    		</script>
    		<a href="javascript: addChangePwdTab('<%=acUser.getId()%>');" style="color: white;"><span id="userSpan"><%=acUser.getRealName() %></span></a>
    	</h2>
    </div>
    <div id="clockDiv">
    	<script type="text/javascript"> 
		<!-- 
		  var NumSrc="../images/clock/c0.gif"; //这是图片"c0.gif"的路径.
		  /*
		  以下用"replace()"(字符串替换)和"eval()"(执行字符串)函数,
		  令变量 c0,c1,...,c9分别是图片"c0.gif","c1.gif",...,"c9.gif"的路径,
		  并把对应的图象预加载入缓存.
		  "cam.gif","cpm.gif"和"colon.gif"不必预加载，因为它们的路径很少变化或不变:
		  */ 
		  for(i=0;i<=9;i++){ 
		    eval("var c"+i+"=new Image();c"+i+".src=NumSrc.replace('c0.gif','c'+i+'.gif');");
		  } 
		  //以下写入时钟各图片,并给它们命名: 
		  document.write('<table border="0" cellspacing="0" height=1><tr>');
		  document.write('<td><img src='+NumSrc+' id="lch1"></td>');
		  document.write('<td><img src='+NumSrc+' id="lch2"></td>');
		  document.write('<td><img src='+NumSrc.replace("c0.gif","colon.gif")+'></td>');
		  document.write('<td><img src='+NumSrc+' id="lcm1"></td>');
		  document.write('<td><img src='+NumSrc+' id="lcm2"></td>');
		  document.write('<td><img src='+NumSrc.replace("c0.gif","colon.gif")+'></td>');
		  document.write('<td><img src='+NumSrc+' id="lcs1"></td>');
		  document.write('<td><img src='+NumSrc+' id="lcs2"></td>');
		  document.write('<td><img src='+NumSrc.replace("c0.gif","cam.gif")+' id="lcapm"></td>');
		  document.write('</tr></table>');
		
		  //以下函数更改相应图片的路径,使图片的显示和当前时间相符: 
		  function timerun(){ 
		    //取得当前时间: 
		    now=new Date();
		    myhour=now.getHours();
		    myminute=now.getMinutes();
		    mysecond=now.getSeconds();
		
		    //判断是上午还是下午: 
		    if(myhour<12) lcapm.src=NumSrc.replace("c0.gif","cam.gif");
		    else lcapm.src=NumSrc.replace("c0.gif","cpm.gif");
		    if(myhour>12) myhour-=12;
		
		    //改变小时数图片: 
		    lch1.src=eval("c"+Math.floor(myhour/10)+".src");
		    lch2.src=eval("c"+myhour%10+".src");
		
		    //改变分钟数图片: 
		    lcm1.src=eval("c"+Math.floor(myminute/10)+".src");
		    lcm2.src=eval("c"+myminute%10+".src");
		
		    //改变秒钟数图片: 
		    lcs1.src=eval("c"+Math.floor(mysecond/10)+".src");
		    lcs2.src=eval("c"+mysecond%10+".src");
		
		    //循环运行本函数: 
		    setTimeout("timerun()",500);
		  } 
		  timerun(); //触发"timerun()"函数的运行.
		//--> 
		</script> 
    	
    </div>
    <div id="logoutDiv"><img src="../images/icons/lock_go.png"/>&nbsp;&nbsp;<a href="../servlet/LogoutServlet" target="_self" style="color: white;"><script type="text/javascript">document.write(layoutMessage.get('ui.layout.logout'));</script></a></div>
  </div>
  <div id="tab1">
  </div>
  <div id="props-panel" style="width:200px;height:200px;overflow:hidden;">
  </div>
  <!-- 
	  <div id="south">
	    <p>south - generally for informational stuff, also could be for status bar</p>
	  </div>
   -->
</body>
</html>